﻿<div class="frame_main">
    <ul>
        <li class="frame_title_line">
            <div class="frame_title no_select">@ViewBag.MyTitle</div>
        </li>
        <li>
            <link rel="stylesheet" type="text/css" href="~/Content/CSS/JumpPage.css" />
            <script type="text/javascript" src="~/Scripts/myJs/JumpPage.js"></script>
            <div id="page">
                <div class="page">
                    <div>
                        <div>&nbsp;&nbsp;共 @ViewBag.AllCount 条记录&nbsp;每页显示10条&nbsp;&nbsp;</div>
                        <div>第 @ViewBag.Index 页 共 @ViewBag.MaxPage 页</div>
                        <div class="btns btn_first0" onclick="PageJump__First('@Url.Action("GetQuestions", "Interaction")')"></div>
                        <div class="btns btn_forward0" onclick="PageJump_Forward('@Url.Action("GetQuestions", "Interaction")')"></div>
                        <div class="btns btn_back" onclick="PageJump_Back('@Url.Action("GetQuestions", "Interaction")')"></div>
                        <div class="btns btn_end" onclick="PageJump_End('@Url.Action("GetQuestions", "Interaction")')"></div>
                        <div>转到第</div>
                        <input name="edu_page_to" value="">
                        <div>页</div>
                    </div>
                    <div class="go_btn" onclick="PageJump_TO_PAGE()"></div>
                </div>
            </div>
            <script>
                nowPage= @ViewBag.Index;
                maxPage= @ViewBag.MaxPage;
                ChangePageCss();
            </script>
        </li>
        <li class="detaile_line">
            <ul class="detaile_ul">
                @if (Model != null)
                {
                    var i = 0;
                    if (i++ < 3)
                    {
                        foreach (var item in Model)
                        {
                            <li>
                                <span class="info" onclick="window.open('@Url.Action("Details_Question", "Interaction", new { id = item.ID })', '', 'height=500,width=820,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,left=200,top=100,resizable=yes');">@item.Title</span>
                                <span class="time"><a href="javascript:;" onclick="Delete_This(this,@item.ID)">删除 @item.ID</a>@item.Time.ToShortDateString()</span>
                            </li>
                        }
                    }
                }
            </ul>
        </li>
    </ul>
</div>
<script type="text/javascript" src="~/Content/EasyUi/jquery.easyui.min.js"></script>
<script>
    function Delete_This(org,id) {
        $.messager.confirm('警告', '你确定要删除吗?', function (r) {
            if (r) {
                $.post(
                    "@Url.Action("DelQuestion", "Interaction")",
                    { "id": id },
                    function () {
                        $(org).parent().parent().remove();
                        alert("删除成功");
                    });
            }
        });
    }
</script>